package cn.mulanbay.auth.config;

import cn.mulanbay.api.system.factory.RemoteMessageFallbackFactory;
import cn.mulanbay.api.system.factory.RemotePaymentFallbackFactory;
import cn.mulanbay.api.system.factory.RemoteUserFallbackFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @author fenghong
 * @create 2022-01-16 10:00
 */
@Configuration
public class FeignConfig {

    /**
     * FeignClient熔断器
     * @return
     */
    @Bean
    public RemoteUserFallbackFactory remoteUserFallbackFactory(){
        return new RemoteUserFallbackFactory();
    }

    /**
     * FeignClient熔断器
     * @return
     */
    @Bean
    public RemoteMessageFallbackFactory remoteMessageFallbackFactory(){
        return new RemoteMessageFallbackFactory();
    }

    /**
     * FeignClient熔断器
     * @return
     */
    @Bean
    public RemotePaymentFallbackFactory remotePaymentFallbackFactory(){
        return new RemotePaymentFallbackFactory();
    }
}
